<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateUserExtrasTable extends Migration
{
    /**
     * Run the migrations.
     *用户不常用信息表
     * @return void
     */
    public function up()
    {
        Schema::create('user_extras', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->comment('用户ID');
            $table->char('real_name', 50)->default('0')->comment('用户真名');
            $table->char('idnumber', 18)->default('0')->comment('身份证号');
            $table->char('album_pwd', 32)->default('0')->comment('相册密码');
            $table->char('pay_pwd', 32)->default('0')->comment('支付密码');
            $table->timestamps();
        });
        DB::statement("alter table `user_extras` comment'用户额外信息表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_extras');
    }
}
